ver = meson.project_version().split('.')
configure_file(
  output: 'dyninstversion.h',
  input: version_h_in,
  format: 'cmake',
  install: true,
  install_dir: get_option('includedir'),
  configuration: {
    'DYNINST_MAJOR_VERSION': ver[0].to_int().to_string(),
    'DYNINST_MINOR_VERSION': ver[1].to_int().to_string(),
    'DYNINST_PATCH_VERSION': ver[2].to_int().to_string(),
  },
)

install_headers(
  'Annotatable.h',
  'Architecture.h',
  'Buffer.h',
  'compiler_annotations.h',
  'compiler_diagnostics.h',
  'concurrent.h',
  'DynAST.h',
  'dyn_regs.h',
  'dyn_syscalls.h',
  'dyntypes.h',
  'Edge.h',
  'entryIDs.h',
  'Graph.h',
  'IBSTree-fast.h',
  'IBSTree.h',
  'MachSyscall.h',
  'mnemonics/aarch64_entryIDs.h',
  'mnemonics/ppc_entryIDs.h',
  'mnemonics/x86_entryIDs.h',
  'mnemonics/AMDGPU/gfx908_entryIDs.h',
  'mnemonics/AMDGPU/gfx90a_entryIDs.h',
  'mnemonics/AMDGPU/gfx940_entryIDs.h',
  'mnemonics/IntelGPU/generic_entryIDs.h',
  'mnemonics/NVIDIA/generic_entryIDs.h',
  'Node.h',
  'ProcReader.h',
  'registers/MachRegister.h',
  'registers/aarch64_regs.h',
  'registers/abstract_regs.h',
  'registers/AMDGPU/amdgpu_gfx908_regs.h',
  'registers/AMDGPU/amdgpu_gfx90a_regs.h',
  'registers/AMDGPU/amdgpu_gfx940_regs.h',
  'registers/cuda_regs.h',
  'registers/MachRegister.h',
  'registers/ppc32_regs.h',
  'registers/ppc64_regs.h',
  'registers/reg_def.h',
  'registers/x86_64_regs.h',
  'registers/x86_regs.h',
  'SymReader.h',
  'unaligned_memory_access.h',
  'util.h',
  'VariableLocation.h',
  preserve_path: true,
)
